<template>
    <div>首页</div>
    <button @click="jump">跳转到列表</button>
    <button @click="$router.push('/article/200')">跳转到文章</button>
</template>

<script setup>
import { useRouter } from 'vue-router';
const router = useRouter()
const jump = () => {
    // 编程式跳转
    router.push('/list')
}
</script>